package com.situ.mall.admin.controller;

import com.situ.mall.admin.service.IMenuService;
import com.situ.mall.admin.vo.InitVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/")
public class IndexController {

    @Autowired
    IMenuService menuService;

//请求获取主页面
    @GetMapping("/index")
    public String index() {
        return "index";
    }

    //请求获取主页面初始化数据 init。json
    @GetMapping("/init")
    @ResponseBody
    public InitVO init(){
        return menuService.init();
    }

    @GetMapping("/superIndex")
    public String index1() {
        return "superIndex";
    }
}
